3.13 \(\int \sin ^3(c+d x) (a+b \tan (c+d x)) \, dx\)

Optimal. Leaf size=69 \[ \frac{a \cos ^3(c+d x)}{3 d}-\frac{a \cos (c+d x)}{d}-\frac{b \sin ^3(c+d x)}{3 d}-\frac{b \sin (c+d x)}{d}+\frac{b \tanh ^{-1}(\sin (c+d x))}{d} \]

[Out]

(b*ArcTanh[Sin[c + d*x]])/d - (a*Cos[c + d*x])/d + (a*Cos[c + d*x]^3)/(3*d) - (b*Sin[c + d*x])/d - (b*Sin[c +
d*x]^3)/(3*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0679413, antiderivative size = 69, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 5, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.263, Rules used = {3517, 2633, 2592, 302, 206} \[ \frac{a \cos ^3(c+d x)}{3 d}-\frac{a \cos (c+d x)}{d}-\frac{b \sin ^3(c+d x)}{3 d}-\frac{b \sin (c+d x)}{d}+\frac{b \tanh ^{-1}(\sin (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[Sin[c + d*x]^3*(a + b*Tan[c + d*x]),x]

[Out]

(b*ArcTanh[Sin[c + d*x]])/d - (a*Cos[c + d*x])/d + (a*Cos[c + d*x]^3)/(3*d) - (b*Sin[c + d*x])/d - (b*Sin[c +
d*x]^3)/(3*d)

Rule 3517

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[Expand[Sin[e
+ f*x]^m*(a + b*Tan[e + f*x])^n, x], x] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IGtQ[n, 0]

Rule 2633

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rule 2592

Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> With[{ff = FreeFactors[S
in[e + f*x], x]}, Dist[ff/f, Subst[Int[(ff*x)^(m + n)/(a^2 - ff^2*x^2)^((n + 1)/2), x], x, (a*Sin[e + f*x])/ff
], x]] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1)/2]

Rule 302

Int[(x_)^(m_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[PolynomialDivide[x^m, a + b*x^n, x], x] /; FreeQ[{a,
b}, x] && IGtQ[m, 0] && IGtQ[n, 0] && GtQ[m, 2*n - 1]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \sin ^3(c+d x) (a+b \tan (c+d x)) \, dx &=\int \left (a \sin ^3(c+d x)+b \sin ^3(c+d x) \tan (c+d x)\right ) \, dx\\ &=a \int \sin ^3(c+d x) \, dx+b \int \sin ^3(c+d x) \tan (c+d x) \, dx\\ &=-\frac{a \operatorname{Subst}\left (\int \left (1-x^2\right ) \, dx,x,\cos (c+d x)\right )}{d}+\frac{b \operatorname{Subst}\left (\int \frac{x^4}{1-x^2} \, dx,x,\sin (c+d x)\right )}{d}\\ &=-\frac{a \cos (c+d x)}{d}+\frac{a \cos ^3(c+d x)}{3 d}+\frac{b \operatorname{Subst}\left (\int \left (-1-x^2+\frac{1}{1-x^2}\right ) \, dx,x,\sin (c+d x)\right )}{d}\\ &=-\frac{a \cos (c+d x)}{d}+\frac{a \cos ^3(c+d x)}{3 d}-\frac{b \sin (c+d x)}{d}-\frac{b \sin ^3(c+d x)}{3 d}+\frac{b \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac{b \tanh ^{-1}(\sin (c+d x))}{d}-\frac{a \cos (c+d x)}{d}+\frac{a \cos ^3(c+d x)}{3 d}-\frac{b \sin (c+d x)}{d}-\frac{b \sin ^3(c+d x)}{3 d}\\ \end{align*}

Mathematica [A]  time = 0.0267371, size = 71, normalized size = 1.03 \[ -\frac{3 a \cos (c+d x)}{4 d}+\frac{a \cos (3 (c+d x))}{12 d}-\frac{b \sin ^3(c+d x)}{3 d}-\frac{b \sin (c+d x)}{d}+\frac{b \tanh ^{-1}(\sin (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[c + d*x]^3*(a + b*Tan[c + d*x]),x]

[Out]

(b*ArcTanh[Sin[c + d*x]])/d - (3*a*Cos[c + d*x])/(4*d) + (a*Cos[3*(c + d*x)])/(12*d) - (b*Sin[c + d*x])/d - (b
*Sin[c + d*x]^3)/(3*d)

________________________________________________________________________________________

Maple [A]  time = 0.035, size = 79, normalized size = 1.1 \begin{align*} -{\frac{b \left ( \sin \left ( dx+c \right ) \right ) ^{3}}{3\,d}}-{\frac{b\sin \left ( dx+c \right ) }{d}}+{\frac{b\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}}-{\frac{a\cos \left ( dx+c \right ) \left ( \sin \left ( dx+c \right ) \right ) ^{2}}{3\,d}}-{\frac{2\,a\cos \left ( dx+c \right ) }{3\,d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(d*x+c)^3*(a+b*tan(d*x+c)),x)

[Out]

-1/3*b*sin(d*x+c)^3/d-b*sin(d*x+c)/d+1/d*b*ln(sec(d*x+c)+tan(d*x+c))-1/3/d*a*cos(d*x+c)*sin(d*x+c)^2-2/3*a*cos
(d*x+c)/d

________________________________________________________________________________________

Maxima [A]  time = 1.36148, size = 95, normalized size = 1.38 \begin{align*} \frac{2 \,{\left (\cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )} a -{\left (2 \, \sin \left (d x + c\right )^{3} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right ) + 6 \, \sin \left (d x + c\right )\right )} b}{6 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)^3*(a+b*tan(d*x+c)),x, algorithm="maxima")

[Out]

1/6*(2*(cos(d*x + c)^3 - 3*cos(d*x + c))*a - (2*sin(d*x + c)^3 - 3*log(sin(d*x + c) + 1) + 3*log(sin(d*x + c)
- 1) + 6*sin(d*x + c))*b)/d

________________________________________________________________________________________

Fricas [A]  time = 2.30315, size = 197, normalized size = 2.86 \begin{align*} \frac{2 \, a \cos \left (d x + c\right )^{3} - 6 \, a \cos \left (d x + c\right ) + 3 \, b \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, b \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \,{\left (b \cos \left (d x + c\right )^{2} - 4 \, b\right )} \sin \left (d x + c\right )}{6 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)^3*(a+b*tan(d*x+c)),x, algorithm="fricas")

[Out]

1/6*(2*a*cos(d*x + c)^3 - 6*a*cos(d*x + c) + 3*b*log(sin(d*x + c) + 1) - 3*b*log(-sin(d*x + c) + 1) + 2*(b*cos
(d*x + c)^2 - 4*b)*sin(d*x + c))/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tan{\left (c + d x \right )}\right ) \sin ^{3}{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)**3*(a+b*tan(d*x+c)),x)

[Out]

Integral((a + b*tan(c + d*x))*sin(c + d*x)**3, x)

________________________________________________________________________________________

Giac [B]  time = 2.78391, size = 7223, normalized size = 104.68 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)^3*(a+b*tan(d*x+c)),x, algorithm="giac")

[Out]

-1/6*(3*b*log(2*(tan(1/2*c)^2 + 1)/(tan(1/2*d*x)^4*tan(1/2*c)^2 + 2*tan(1/2*d*x)^4*tan(1/2*c) + 2*tan(1/2*d*x)
^3*tan(1/2*c)^2 + tan(1/2*d*x)^4 + 2*tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)^3 + 2*tan(1/2*d*x)*tan(1/2*c
)^2 + 2*tan(1/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 2*tan(1/2*c) + 1))*tan(1/2*d*x)^6*tan(1/2*c)^6 - 3*b*
log(2*(tan(1/2*c)^2 + 1)/(tan(1/2*d*x)^4*tan(1/2*c)^2 - 2*tan(1/2*d*x)^4*tan(1/2*c) - 2*tan(1/2*d*x)^3*tan(1/2
*c)^2 + tan(1/2*d*x)^4 + 2*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)^3 - 2*tan(1/2*d*x)*tan(1/2*c)^2 + 2*ta
n(1/2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x) + 2*tan(1/2*c) + 1))*tan(1/2*d*x)^6*tan(1/2*c)^6 + 4*a*tan(1/2*d*
x)^6*tan(1/2*c)^6 + 9*b*log(2*(tan(1/2*c)^2 + 1)/(tan(1/2*d*x)^4*tan(1/2*c)^2 + 2*tan(1/2*d*x)^4*tan(1/2*c) +
2*tan(1/2*d*x)^3*tan(1/2*c)^2 + tan(1/2*d*x)^4 + 2*tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)^3 + 2*tan(1/2*
d*x)*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 2*tan(1/2*c) + 1))*tan(1/2*d*x)^6*tan(1
/2*c)^4 - 9*b*log(2*(tan(1/2*c)^2 + 1)/(tan(1/2*d*x)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